//
//  YHYMVloadTableViewCell.m
//  TTMusic
//
//  Created by yanghuiyan on 16/4/11.
//  Copyright © 2016年 cpy. All rights reserved.
//

#import "YHYMVloadTableViewCell.h"

@interface YHYMVloadTableViewCell ()

//@property (strong, nonatomic) IBOutlet UIProgressView *myPregress;
/**
 *  下载任务
 */
@property (nonatomic, strong) NSURLSessionDownloadTask* downloadTask;
/**
 *  resumeData记录下载位置
 */
@property (nonatomic, strong) NSData* resumeData;
/**
 *  session
 */
@property (nonatomic, strong) NSURLSession* session;

@end


@implementation YHYMVloadTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.titleLabel = [TTMusicBaseLabel new];
        _titleLabel.backgroundColor = [UIColor cyanColor];
        [self.contentView addSubview:_titleLabel];
        
        self.pgLabel = [TTMusicBaseLabel new];
        _pgLabel.backgroundColor = [UIColor cyanColor];
        [self.contentView addSubview:_pgLabel];
        
        self.myPregress = [[UIProgressView alloc] initWithFrame:CGRectZero];
        [self.contentView addSubview:_myPregress];

    }
    return self;
}


- (void)layoutSubviews {
    [super layoutSubviews];
    
    _titleLabel.frame = CGRectMake(10, 5, self.contentView.bounds.size.width / 2, self.contentView.bounds.size.height / 2 - 10);
    
    _myPregress.frame = CGRectMake(10, self.contentView.bounds.size.height / 2 + 10 , self.contentView.bounds.size.width / 2,  10);
    
    _pgLabel.frame = CGRectMake(self.contentView.bounds.size.width / 2 + 15, self.contentView.bounds.size.height / 2 , self.contentView.bounds.size.width / 3, self.contentView.bounds.size.height / 2 - 10);
}







@end
